import {getPath} from './util'
import store from '../repo/store/store'

const RouterBase = [
  {
    path: '/',
    redirect: to => {
      let hsId = store.getters.hsId
      let loginType = store.getters.loginType
      return `/tab/home/${loginType}/${hsId}`
    }
  },
  {
    path: getPath('/tab/home'),
    name: 'home',
    component: resolve => require([`@/pages/home/home`], resolve),
    meta: {
      title: '经纪人云大学',
    }
  },
  {
    path: getPath('/me'),
    name: 'me',
    component: resolve => require([`@/pages/tabs/me/me`], resolve),
    meta: {
      requireAuth: true,
      title: '我的',
      ignoreEnterprise:true,
    }

  },


];

export default RouterBase
